package com.weslide.weslideapp.fragment;

import com.weslide.weslideapp.R;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;

public class MyExchangeRecord extends WeSlideFragment {
	public static final String TAG = "MyExchangeRecord";
	private ListView mLvRecords;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		globalView = inflater.inflate(R.layout.page_my_exchange_records,
				container, false);
		findViews();
		initView();
		return globalView;
	}

	private void findViews() {
		mLvRecords = (ListView) findViewById(R.id.page_my_exchange_records_mLvRecords);
		findViewById(R.id.page_my_exchange_records_mImgVBack)
				.setOnClickListener(new OnClickListener() {

					@Override
					public void onClick(View v) {
						getGlobalNavigatrionFragment().pop();
					}
				});
	}

	private void initView() {
		mLvRecords.setAdapter(myAdapter);
	}

	private BaseAdapter myAdapter = new BaseAdapter() {

		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
			View view = getActivity().getLayoutInflater().inflate(
					R.layout.item_my_record, null);
			return view;
		}

		@Override
		public long getItemId(int position) {
			return position;
		}

		@Override
		public Object getItem(int position) {
			return null;
		}

		@Override
		public int getCount() {
			return 10;
		}
	};
}
